Unsupervised: Training data contains independent variables, Model gets trained to form
groups of training data, Semi-supervised: some of the data points have target information
while some do not have target information, used when collecting target data is infeasible for
all data points), Multi-instance learning: Each data point has multiple dependent variables
(Text tagging), Reinforcement Learning: Training models with rewards and penalties using
which the model trains its decision process, it tries to maximize its reward, this is different
from Supervised and Unsupervised Learning, it does data collection and model evaluation, all
on its own.
62. Loosely how can supervised learning be converted into unsupervised learning and
vice-versa? Supervised Learning can be converted to Unsupervised Learning by discarding
the label of the data points. Unsupervised Learning can be converted to Supervised Learning
by training an Unsupervised model for a fewer number of data points, manually label clusters
by analysing the data points in each cluster, the whole cluster is assigned a label. Using this
data with labels we can do supervised learning.
63. Derive the normal equation for linear regression. The objective of Linear Regression
modeling is to determine the weights of the line that generalises the dataset with least error.
The loss function generally used is Least Squared error. Normal equation that defines the
weight vector of the model is given as: θ = (X
T
X)
-1
* (X
T
Y). Predicted value for a data point is
given by: y_pred = θ
T
X. The cost function for linear regression model is Cost = (1/2m)*
summ(1 to m) (Xθ - Y)
2
, m = number of training data points. Now, the equation can be
transformed into: Cost = θ = (Xθ - Y)
T
* (Xθ-Y). Optimizing this cost function for minimum we
have gradient: grad(Cost, θ) = 2(X
T
X) θ - 2(X
T
Y). And for minimum value for the cost function
the gradient should be 0. 2(X
T
X) θ - 2(X
T
Y) = 0 → (X
T
X)
-1
(X
T
X) θ = (X
T
X)
-1
* (X
T
Y).
64. Discuss training error, test error, generalization error, overfitting, and underfitting. Training
error
: the error between predicted and true values of the data that is used to train the model.
Test error
: Predictions generated on test data by a trained model are compared with the true
values of the test data. Generalization error
: Error between prediction and true values of the
target variable for previously unseen data. Overfitting
occurs when Train error is low, test
error and generalization error are high, Underfitting
occurs when all train, test and
generalization errors are high.
65. What do you mean by affine transformation? Discuss affine vs. linear transformation. Affine
transformation is a composition of linear transformation and a translation. It maps points in a
space to another space, maintains or preserves collinearity and parallelism while changing
the origin of the data points. Linear transformation is a sub element of affine transformation
where the origin is fixed and carries all other characteristics of affine transformation.
66. Compare representational capacity vs. effective capacity of a model. The Representational
Capacity is a family of functions the learning algorithm specifies when varying the parameters
73